<?php
require_once "../database/mysql.class.php";
//DAO对象，对数据库操作
//对应用户表，用户的增删改查

class speedsetdao{

	private $db;

	public function __construct(){
		$this->db=new mysql();
	}
	
	public function Chaxun(){		
			$sql="select * from speedset order by id;";
			return $this->db->query($sql);		
	}
	public function Update($crush){
		//$crush=$_GET['crush'];		
		if (isset($crush)){
		$sql="UPDATE speedset SET crushspeed='".$crush."m/h' WHERE id=1;";
		//var_dump($sql);
		return $this->db->update($sql);
		}
	}
	public function Updatemax($crushmax){
		
		//echo  $crushmax;
		if (isset($crushmax)){
		$sql="UPDATE speedset SET crushmax='".$crushmax."m/h' WHERE id=1;";
		return $this->db->update($sql);
		}
	}
}






?>